﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.TK
{
    class Class5
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.InsurantStates.Contains("重大疾病"))
            {
                if (ppa.Period == 0)
                {
                    da.Value = ppa.TotalFee;
                    da.Description = "退还已交保费";
                }
                else if (ppa.Period > 0 && ppa.Age <= 65)
                {
                    da.Value = ppa.Amount * 2;
                    da.Description = "双倍赔偿";
                }
                else if (ppa.Age > 65)
                {
                    da.Value = ppa.Amount;
                }
                ppa.IsCurrentFinish = true;
            }

        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                if (ppa.Period == 0)
                {
                    da.Value = ppa.TotalFee;
                    da.Description = "退还已交保费";
                }
                else if (ppa.Period > 0 && ppa.Age <= 65)
                {
                    da.Value = ppa.Amount * 2;
                    da.Description = "双倍赔偿";
                }
                else if (ppa.Age > 65)
                {
                    da.Value = ppa.Amount;
                }
            }

        }
    }
}
